#DialDemo.py
#enconding=utf-8

import sys
from PyQt5.QtWidgets import QWidget,QLCDNumber,QDial,QApplication
from PyQt5.QtCore import Qt

class Example(QWidget):
    def __init__(self):
        super().__init__()
        self.initUI()

    def initUI(self):
        lcd=QLCDNumber(self)
        dial=QDial(self)

        self.setGeometry(300,300,350,250)
        self.setWindowTitle('点豆开花出品')

        lcd.setGeometry(100,50,150,60)
        dial.setGeometry(120,120,100,100)

        dial.valueChanged.connect(lcd.display)

        self.show()

if __name__ == '__main__':
    app=QApplication(sys.argv)
    ex=Example()
    sys.exit(app.exec_())
